<!DOCTYPE html>
<html lang="">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title></title>
</head>

<body>
  <ul>
    <li>这个只是试验一下,能不能隐藏?点击这个按钮,大声的告诉我.</li>
    <li>aass</li>
  </ul>
</body>
</html>
<style>
    
</style>
<script>
    var oA=document.getElementsByTagName('a');
    var i=0;
    window.onload=function ()
    {
        var aA=document.getElementsByTagName('a');
        var oLi=document.getElementsByTagName('li');
        var i=0;

        for(i=0;i<aA.length;i++)
            {
                oLi[i].onclick=function()
                {
                    this.style.display='none';
                }
                aA[i].onclick=function ()
                {
                    this.parentNode.style.display='none';
                }
            }
    }

</script>